package com.vois.jack.btmgr.devices.WLCommonBleDev;

public enum WLBleCommand {
    BLE_CMD_GET_SEQID(0x21),
    BLE_CMD_SET_SEQID(0x31),
    BLE_CMD_GET_ADDRESS(0x2A),
    BLE_CMD_GET_VENDOR(0x22),
    BLE_CMD_GET_VERSION(0x23),
    BLE_CMD_START_RECORD(0x34),
    BLE_CMD_STOP_RECORD(0x35),
    BLE_CMD_GET_CUR_SESSION_NAME(0x28),
    BLE_CMD_GET_CUR_SPEAKER_NAME(0x27),
    BLE_CMD_RECORD_STATUS_IND(0x2B),
    BLE_CMD_NET_STATUS_IND(0x25),
    BLE_CMD_PTT_SESSION_STATUS_IND(0x24),
    BLE_CMD_START_PLAY_RING(0x37),
    BLE_CMD_STOP_PLAY_RING(0x38),
    BLE_CMD_RING_FINISH_IND(0x26),
    BLE_CMD_QUERY_MEDIA_FEATURE(0x1F),
    BLE_CMD_BYPASS_COMMAND(0xA1),
    BLE_CMD_NONE(-1);

    private int value;

    public int getValue() {
        return value;
    }

    WLBleCommand(int value) {
        this.value = value;
    }

    static public WLBleCommand valueOf(int value) {
        for (WLBleCommand wlBleCommand: WLBleCommand.values()) {
            if (wlBleCommand.getValue() == value) {
                return wlBleCommand;
            }
        }

        return BLE_CMD_NONE;
    }
}
